import { Request } from 'express';
import { LoginUserInfoFormatted, UserRole } from '@utils/formatter';

export interface DataStoredInToken {
  id: number;
  name: string;
  username: string;
  departmentId?: number | null;
  departmentName: string;
  email: string;
  roles: UserRole[];
}

export interface TokenData {
  accessTokenExpiration: number;
  refreshTokenExpiration?: number;
  accessToken: string;
  refreshToken?: string;
}

export interface RequestWithUser extends Request {
  user: LoginUserInfoFormatted;
}

export interface RequestWithId extends RequestWithUser {
  id: string;
}
